<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title><?php echo $this->_siteConfig->name;?></title>
    <link type="image/x-icon" href="<?php echo IUrl::creatUrl("")."favicon.ico";?>" rel="icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="apple-touch-icon-precomposed" href="<?php echo $this->getWebSkinPath()."image/logo.gif";?>">
    <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/jquery/jquery-1.12.4.min.js"></script> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/form/form.js"></script> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/autovalidate/validate.js"></script><link rel="stylesheet" type="text/css" href="/git/micarshop/runtime/_systemjs/autovalidate/style.css" /> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artdialog/artDialog.js"></script><script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artdialog/plugins/iframeTools.js"></script><link rel="stylesheet" type="text/css" href="/git/micarshop/runtime/_systemjs/artdialog/skins/aero.css" /> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artTemplate/artTemplate.js"></script><script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artTemplate/artTemplate-plugin.js"></script>
    <script src="<?php echo $this->getWebViewPath()."javascript/common.js";?>"></script>
    <script src='<?php echo $this->getWebViewPath()."javascript/site.js";?>'></script>
    <link rel="stylesheet" href="<?php echo $this->getWebSkinPath()."style/style.css";?>">
</head>

<body>
    <!-- 顶部通栏 -->
    <header class="header_box">
        <div class="header">
            <?php if(IWeb::$app->getController()->getId() == 'site' && IWeb::$app->getController()->getAction()->getId() == 'index'){?>
            <div class="header_home"><i class="icon-home"></i></div>
            <?php }else{?>
            <div class="header_back" onclick="window.history.back();"><i class="icon-chevron-left"></i></div>
            <?php }?>
            <h1 id="page_title" class="page_title"><?php echo $this->_siteConfig->name;?></h1>
        
            <!-- <div class="header_so_btn" onclick="$('.header_search').toggle();"><i class="icon-search"></i></div> -->
            <div class="header_so_btn" onclick="jump_url()"><i class="icon-search"></i></div>
        
        </div>
    </header>
    <!-- 顶部搜索 -->
    <section class="header_search">
        <form method='get' action="<?php echo IUrl::creatUrl("/");?>">
            <input type='hidden' name='controller' value='site'>
            <input type='hidden' name='action' value='search_list'>
            <input class="keywords" type="text" name='word' autocomplete="off" placeholder="请输入关键词...">
            <input class="submit" type="submit" value="搜索">
        </form>
    </section>
    <!-- 引入内页 -->
    <section class="viewport">
        <div id="pageInfo" data-title="申请退款"></div>
<form action="<?php echo IUrl::creatUrl("/ucenter/refunds_update");?>" method="post" callback="checkForm();">
	<input type="hidden" name="order_id" value="<?php echo isset($this->orderRow['id'])?$this->orderRow['id']:"";?>" />
	<section class="refunds_edit">
		<div class="base">
			<strong>订单号：</strong>
			<span><?php echo isset($this->orderRow['order_no'])?$this->orderRow['order_no']:"";?></span><br>
			<?php 
				//echo "<pre>";
				//print_r($this->orderRow);
				//echo "</pre>";
			?>
		</div>
		<div class="input_li goods">
			<strong>选择退款商品：</strong>
			<?php if($this->orderRow['order_type'] == "r"){?>
				<?php foreach(Api::run('getOrderGoodsListByGoodsid',array('#order_id#',$this->orderRow['id'])) as $key => $good){?>
					<?php $good_info = JSON::decode($good['goods_array'])?>
					<?php if($good['is_send'] != 2){?>
					<label class="input_radio block">
						<input type="checkbox" name="order_goods_id[]" value="<?php echo isset($good['id'])?$good['id']:"";?>">
						<span><?php echo isset($good_info['name'])?$good_info['name']:"";?><?php if($good_info['value']){?><?php echo isset($good_info['value'])?$good_info['value']:"";?><?php }?> × <?php echo isset($good['goods_nums'])?$good['goods_nums']:"";?>件</span>
					</label>
					<?php }?>
				<?php }?>
				
				<?php }else{?>
				<?php foreach(Api::run('getVrOrderGoodsListByGoodsid',array('#order_no#',$this->orderRow['order_no'])) as $key => $good){?>
					
					<?php $good_info = JSON::decode($good['goods_array'])?>
					<?php if($good['is_send'] != 2){?>
					<label class="input_radio block">
						<input type="checkbox" name="order_goods_id[]" value="<?php echo isset($good['id'])?$good['id']:"";?>">
						<span><?php echo isset($good_info['name'])?$good_info['name']:"";?><?php if($good_info['value']){?><?php echo isset($good_info['value'])?$good_info['value']:"";?><?php }?> × <?php echo isset($good['goods_nums'])?$good['goods_nums']:"";?>件</span>
					</label>
					<?php }?>
				<?php }?>
				<input type="hidden" name="order_type" value="vr" />
				
			<?php }?>
		</div>
		<div class="input_li note">
			<strong>备注退款理由：</strong>
			<div>
				<textarea name="content" id="content" class="input_textarea" pattern="required" initmsg="" alt="填写退款备注信息"></textarea>
			</div>
		</div>
	</section>
	<div class="btn_bottom">
		<div class="btn_tab">
			<label class="btn_tab_submit blue">提交退款申请<input type="submit"></label>
		</div>
	</div>
</form>

<script type="text/javascript">
$(function(){
	// 隐藏底部导航
	hideNav();
})

//提交表单检查
function checkForm(){
	if($('#content').val() == ''){
		alert('请填写退款原因');
		return false;
	}
	if($('[name="order_goods_id[]"]:checked').length == 0){
		alert('请选择要退款的商品');
		return false;
	}
	return true;
}
</script>
    </section>
    <!-- 会员登陆与否显示不同内容 -->
    <?php if($this->user){?>
    <?php }else{?>
    <!-- 
    <section class="footer_login">
        <a class="login" href="<?php echo IUrl::creatUrl("simple/login");?>">登录</a>
        <a class="reg" href="<?php echo IUrl::creatUrl("simple/reg");?>">注册</a>
    </section> -->
    <?php }?>
    <!--底部菜单-->
    <nav class="footer_nav">
        <ul>
            <li class="nav_home"><a href="<?php echo IUrl::creatUrl("site");?>"><i class="icon-home"></i><span>首页</span></a></li>
            <li class="nav_cart"><a href="<?php echo IUrl::creatUrl("simple/cart");?>"><i class="icon-shopping-cart"></i><span>购物车</span></a></li>
            <li class="nav_user"><a href="<?php echo IUrl::creatUrl("/ucenter/index");?>"><i class="icon-user"></i><span>个人中心</span></a></li>
            <li class="nav_map"><a href="<?php echo IUrl::creatUrl("site/sitemap");?>"><i class="icon-reorder"></i><span>分类</span></a></li>
        </ul>
    </nav>
    <script src='<?php echo $this->getWebViewPath()."javascript/mobile.js";?>'></script>
</body>

</html>

<script type="text/javascript">

var ex = "http://"+window.location.host+"/";
function jump_url(){
	
	//window.location.href = ex+"site/goseachpage";
	window.location.href = ex+"git/micarshop/site/goseachpage";
	
}

</script>

